filetype plugin on
set number
set relativenumber
set autoindent
set tabstop=4
set shiftwidth=4
set smarttab
set softtabstop=4
set mouse=a
set nohls
set ignorecase
"set paste
set encoding=UTF-8
"set foldmethod=indent

syntax on

set background=dark
"colorscheme jellybeans
"colorscheme darcula
colorscheme solarized

set foldmethod=indent
"set foldlevelstart=99
set nofoldenable
set foldnestmax=10
set foldlevel=2

set cursorline
hi CursorLine cterm=NONE ctermbg=darkgrey ctermfg=white guibg=darkgrey guifg=white


call plug#begin()
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
Plug 'tpope/vim-surround' " Surrounding ysw)
Plug 'tpope/vim-commentary' " For Commenting gcc & gc
Plug 'kien/ctrlp.vim'
Plug 'jiangmiao/auto-pairs'
Plug 'doums/darcula'
Plug 'windwp/nvim-autopairs'
Plug 'arcticicestudio/nord-vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
"Plug 'preservim/nerdcommenter'
"Plug 'preservim/tagbar'
call plug#end()

nnoremap <C-l> :NERDTreeToggle<CR>
"nnoremap <C-s> :w<CR>
"rust
nnoremap <leader>x :!cargo run -q --bin %:r<CR>
nnoremap <leader>n :!cargo run -q  %:r<CR>

let g:NERDTreeDirArrowExpandable="+"
let g:NERDTreeDirArrowCollapsible="-"

set wildignore+=*/tmp/*,*.so,*.swp,*.zip     " MacOSX/Linux
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe  " Windows

let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
let g:ctrlp_custom_ignore = {
  \ 'dir':  '\v[\/]\.(git|hg|svn)$',
  \ 'file': '\v\.(exe|so|dll)$',
  \ 'link': 'some_bad_symbolic_links',
  \ }

" tagbar
"nmap <leader>t :TagbarToggle<CR>
